﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SportsPlatform.BaseModels;

namespace SportsPlatform.Model.PermissionManagement
{
    /// <summary>
    /// 授权信息表
    /// </summary>
    [Table("PM_AuthorizationInfo")]
    public  class AuthorizationInfo : BaseModel
    {
        /// <summary>
        /// 客户ID
        /// </summary>
       public Guid CompanyId { get; set; }

        /// <summary>
        /// 使用人
        /// </summary>
        public Guid UserId { get; set; }

        /// <summary>
        /// 审核状态 0未审核，1审核通过，2审核不通过
        /// </summary>
        public int States { get; set; }

        /// <summary>
        /// 授权电脑序列号
        /// </summary>
        [Required]
        [MaxLength(100)]
        public string AuthorizationSerialNumber { get; set; }

        /// <summary>
        /// 授权码
        /// </summary>
        [MaxLength(100)]
        public string AuthorizationCode { get; set; }

        /// <summary>
        /// 授权文件地址
        /// </summary>
        [Column(TypeName = "text")]
        public string AuthorizationFileUrl { get; set; }

        /// <summary>
        /// 公钥保留加密
        /// </summary>
        [Column(TypeName = "text")]
        public string PublicKey { get; set; }

        /// <summary>
        /// 私钥返回
        /// </summary>
        [Column(TypeName = "text")]
        public string PrivateKey { get; set; }

        /// <summary>
        /// 过期时间
        /// </summary>
        public DateTime? ExpireTime { get; set; }
    }
}
